package com.longrise.filedownloader.db;

/**
 * Created by xkj on 16/4/13.
 * 数据库相关的常量类
 */
public interface SQLConstants {
    //数据库中下载的表名
   String TABLENAME_DOWNLOAD = "download" ;

   //新建表
    String CREATE_DOWNLOAD_SQL = "create table if not exists "+TABLENAME_DOWNLOAD+" ("
           +SQLConstants.ID+" integer primary key autoincrement not null, "
           +SQLConstants.USERID+" varchar, "
           +SQLConstants.URL+" varchar, "
           +SQLConstants.FILENAME+" varchar, "
           +SQLConstants.CACHPATH+" varchar, "
           +SQLConstants.TEMPFILEPATH+" varchar, "
           +SQLConstants.FILESIZE+" long, "
           +SQLConstants.DOWNLOADSIZE+" long, "
           +SQLConstants.DOWNLOADSTATUS+" integer, "
           +SQLConstants.POSITION+" integer"
           + ")";

    //ID
    String ID = "id";

    //用户ID
    String USERID = "userid";

    //下载地址 url
    String URL = "url";

    //文件名称 fileName
    String FILENAME = "fileName";

    //文件下载地址 cachPath
    String CACHPATH = "cachPath";

    //文件下载时缓存的地址
    String TEMPFILEPATH = "TempFilePath";

    //文件总大小
    String FILESIZE = "filesize";

    //已经下载的大小
    String DOWNLOADSIZE = "downloadSize";

    //文件下载的状态
    String DOWNLOADSTATUS = "downloadstatus";

    String POSITION = "fileposition" ;
}
